using System;
using JoyfulHomeJourney.BackEnd.Infrastructure.EFCore;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Requests.Objects;
namespace JoyfulHomeJourney.BackEnd.Server.Instances.Extends.Requests
{
	public static class EntitySysProductsCreateExtend
{
		public static SysProducts ToSysProductsCreateEntity(this RequestSysProductsDto dto)
		{
			return new SysProducts
			{
				PBrand = dto.brand,
				PDeduction = dto.deduction,
				PDescription = dto.description,
				PCsId=dto.carShopId,
				PDiscount = dto.discount,
				PName = dto.name,
				PPrice = dto.price,
				PStockQuantity = dto.stockQuantity,
			};
		}
	}
}
